import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import '@unocss/reset/normalize.css'
import '@/style/index.scss'
import element from '@/plugins/element'
import App from './App.vue'
import router from '@/router'
import 'virtual:uno.css'
import './permission'

const mainFn = async () => {
  const app = createApp(App)
  app.use(element)
  app.use(router)

  const pinia = createPinia()
  pinia.use(piniaPluginPersistedstate)
  app.use(pinia)
  app.mount('#app')
}
mainFn().then(() => {})
